Outlier detection for colour mapping

ABSTRACT

A method and an arrangement for an improved outlier detection for colour mapping are recommended, wherein a neighborhood of a partially colour compensated test-image by comparing the initially corrected test-image with a reference image in a neighborhood comparator is used for outlier detection and not outlier detection of at least two images for colour mapping.

FIELD OF THE INVENTION

The invention relates to a method and arrangement for improved outlier detection for colour mapping of multiple views based applications such as stereoscopic or 3-D imaging.

BACKGROUND

Applications involving multiple views of the same scene, such as stereo imaging in the meaning of stereoscopic or 3-D imaging, or applications involving multiple versions of originally the same image, such as two different scans of the same film negative, suffer from geometric differences and colour differences between corresponding images. Stereoscopic imaging or real 3D re-quires a minimum of two pictures simulating our two eyes, the left image and the right image. Geometric differences can be caused by parallax in case of stereo images and by cropping, zoom, rotation or other geometric transforms in case of film scans. Colour differences are being caused for example by non-calibrated cameras, non-calibrated film scanners, automatic exposure settings, automatic white balancing or even physical light effects in the scene. Colour difference compensation is often the first step in image or video signal processing of multiple view or stereoscopic pictures as other steps such as disparity estimation or data compression benefited from low colour difference. One approach for the compensation of colour differences between images is colour mapping also called tone mapping, which is applied for colour trans-formation. Colour mapping has the task of remapping the colour coordinates of an image to be suitable for further colour signal processing, colour signal transmission or colour reproduction. Colour mapping starts typically with finding Geometric Feature Correspondences, in the following abbreviated GFC, using methods such as Scale Invariant Feature Transformation, in the following abbreviated SIFT or simply using a normalized cross correlation. GFC is a list of pairs of corresponding feature points in multiple views, for example the left and the right images. GFC allow coping with the geometric differences between left and right images. As GFC computation is not free from errors, some of the corresponding feature points are wrong and are so-called outliers. Wrong corresponding feature points are not positioned on the same semantic image detail in the left and in the right images. In a next step, those outliers are usually removed from GFC. Colour coordinates such as e.g. R, G, and B for red, green and blue are then retrieved from the two images using the feature correspondences in a further step. In the following, these retrieved colours will be called Colour Correspondences, abbreviated by CC. Finally, the CC is used to fit a colour mapping model. As said outlier removal step is significant because for example, if a GFC lies in a highly textured region, a small error in spatial position of GFC can generate a large error in CC so that improved outlier detection is desired.

Invention

A problem to be solved by the invention is to provide a method and an arrangement for improved outlier detection which avoids errors of known outlier removal methods. One known outlier detection method is to remove outliers directly after calculation of GFC. This method rejects a sample GFC as outlier if it does not match a geometric transformation model that is estimated from all GFC. A known error of this method is that the geometric transformation model may not be able to describe all geometric differences between left and right images, notably at high depth dynamics. A second known outlier detection method is to reject a sample CC in the framework of robust estimation of an initial color mapping model. This method rejects a sample CC as outlier if an initial estimated colour mapping model is far from the sample CC. This outlier detection technique misses a wide range of true outliers as well as mistakenly detects some truly valid CC as outliers. Another error is inconsistency between colour channels such as e.g. applying a colour mapping model per channel without cross checking of outlier decisions between colour channels.

It is an aspect of the invention to reduce the number of false negatives which means to reduce the number of cases where a sample is detected as valid but truly is an outlier. Reducing false negatives is important as the color mapping model can be influenced by those missed outliers.

It is a further aspect of the invention to reduce the number of false positives in outlier detection, which means to reduce the number of cases where a Colour Correspondences is detected as an outlier but truly is not an outlier to provide more valid information for an improved colour mapping model.

Although it may be assumed that outlier detection in general is limited by the characteristic of the applied outlier removal method as outliers are removed after computing Geometric Feature Correspondences, improved outlier detection for color mapping even in the presence of outliers and high depth dynamics shall be provided.

According to the present invention improved outlier detection is provided by a method and an arrangement which exploit the spatial neighborhood of Geometric Feature Correspondences in left and right stereo images to remove outliers from the Geometric Feature Correspondence. That means that in difference to classical robust estimation methods in so far that the decision to use or not to use a feature point is not only based on the feature point itself but on the spatial neighborhood of the corresponding feature point in the original and the target images as e.g. the left image of two images is used as reference image and the right image is used as test image.

Therefore it is recommended for a given n-tuple of input images, and an initial set of n-tuples of corresponding feature points between the images of the n-tuple of input images, each feature point of an n-tuple of corresponding feature points being an image position in the related image of the n-tuple of images, respectively, to apply the following steps:

-   -   estimating an initial colour mapping model capable to compensate         the image colours of the given, corresponding feature points of         said set of n-tuples of corresponding feature points, the         initial colour mapping model being a colour transform,     -   defining a spatial neighborhood for each feature point in each         image of said n-tuple of input images,     -   for all n-tuples of said set of n-tuples of corresponding         feature points to compensate the colour differences of the         feature points and their spatial neighborhoods using said         current colour mapping model,     -   rejecting as outlier those n-tuples of corresponding feature         points that have remaining colour differences higher than a         threshold resulting in an reduced set of n-tuples of feature         correspondences,     -   estimating a refined colour mapping model capable to compensate         the image colours of the reduced set of feature points colours         of said set of n-tuples of additional colours, the refined         colour mapping model being a colour trans-form and     -   setting the current colour mapping colour transform to said         refined colour mapping colour transform and go on with the         second step as defining a spatial neighborhood for each feature         point in the corresponding image of said n-tuple of input images         and proceed as mentioned above.

A so-called n-tuple is a sequence or ordered list of n elements, where n is a positive integer.

The method may be e.g. varied by making the threshold for remaining colour differences adapted to the colour signal, for example setting it to a multiple of the colour difference before colour mapping or after colour mapping, or using colour ratios instead of colour differences without to depart from the gist of the present invention.

That means that the outlier detection for colour mapping is based on the principle that e.g. a left image of a pair of images is determined as reference image whereas the right image of the stereo pair is determined as test image or vice versa and for said images a Geometric Feature Correspondences and a Colour Correspondences are computed first. Then, a colour mapping model as e.g. a model including parameters for gamma, offset and gain is estimated and is e.g. used to achieve the initial colour corrected test image. It is important to note that this initial colour correction uses all Colour Correspondences including outliers. Then, the Geometric Feature Correspondence neighborhood of the initial colour corrected test image and the reference image are being compared. As the test image is already initially colour compensated, the colour characteristics of the neighborhoods of an n-tuple out of the set of n-tuples of corresponding feature points should be close i.e. the remaining colour difference in the neighborhood should be below a threshold. If the neighborhood difference for an n-tuple is below said threshold then the Colour Correspondences corresponding to this n-tuple is decided to not be an outlier and vice-versa. The threshold is determined as a multiple a variance of the estimation error.

Experimental results have shown that by applying the proposed method for outlier detection that detected outliers are really outliers and false positive detected outliers are not really outliers if a certain pixel block size is used. As the proposed method determines outliers by comparing the neighborhood, the size of the neighborhood has an important impact on the performance of outlier detection. It has been observed that until a certain threshold as the neighborhood size is increasing the outlier detection performance is also increasing.

Advantages of the recommended outlier detection for colour mapping are e.g. that it is easier to analyze a partially colour-corrected image—the initially corrected test image—than a non colour corrected image and the exploitation of spatial neighborhood of the initially corrected test image to improve the outlier detection in view of robustness and reliability of colour mapping.

The recommended method for outlier detection is realised by an arrangement comparing the spatial neighborhood of the corresponding feature point in the original and the target image and is e.g. provided in a camera or film scanner for processing stereoscopic images.

The specific nature of the invention as well as other objects, advantages, features and uses of the invention will become evident from the following description of a preferred embodiment taken in conjunction with the accompanying drawings.

DRAWINGS

Exemplary embodiments of the invention are described with reference to the accompanying drawings, which show in:

FIG. 1 a flowchart of outlier detection according to the invention;

FIG. 2 a flowchart of valid CC detection;

FIG. 3 a schematic illustrating the result of neighborhood comparison;

FIG. 4 a schematic illustrating a sample situation where prior art outlier removal fails;

FIG. 5 a diagram illustrating outliers whereas in reality they are not outliers;

FIG. 6 a diagram illustrating prior art method to remove outliers;

FIG. 7 a schematic illustrating basic steps of colour mapping;

FIG. 8 a schematic illustrating colour difference compensation as a first step of stereo image processing;

FIG. 9 a block diagram of outlier detection according to the invention;

FIG. 10 a block diagram illustrating an arrangement for outlier detection according to the invention;

FIG. 11 illustrates a reference R test T and initially colour corrected test-image C of a building;

FIG. 12 a diagram illustrating red channel estimation of a scene—Building—;

FIG. 13 a diagram illustrating green channel estimation of the scene—Building—;

FIG. 14 a diagram illustrating blue channel estimation of the scene—Building—;

FIG. 15 a table illustrating 3×3 pixel block neighborhood comparison

FIG. 16 illustrates missed outlier in a stereoscopic picture which are e.g. red pixels in the picture, here for visibility purposes illustrated by an X and caused due to homogenous neighborhood;

FIG. 17 illustrates surrounded points Y detected as outlier pixel in a dark brick colour neighborhood with a 25×25 pixel block neighborhood detection and

FIG. 18 illustrates a missed outlier of a neighborhood pattern having similar neighborhood in the similar pattern matched by chance with another location, here for visibility purposes illustrated by a Z.

EXEMPLARY EMBODIMENTS

In the framework of stereo imaging, 3D video content needs to be created, processed and reproduced on a 3D capable screen. Processing of 3D video content allows to create or enhance 3D information as for example disparity estimation or to enhance 2D images using 3D information as for example view interpolation. Often 3D video content is created from two or more captured 2D videos. By relating the two or more views of the same scene in a geometrical manner, 3D information can be extracted.

In video processing for stereo imaging, issues are color differences between the two or more views of the same scene. These differences may result for example from physical light effects or from uncalibrated cameras. It would be preferable if such color differences could be compensated.

The compensation of such color differences will help a series of applications. For example, when a stereo video sequence is compressed, compensation of color differences can reduce the resulting bitrate. So, stereo compression algorithms benefits from the compensation of colour differences. Another example is the 3D analysis of stereo sequences. When color differences are compensated, disparity estimation can be more precise. Another example is 3D assets creation for visual effects in post-production. When color differences in a multi-view sequence are compensated extracted texture for 3D objects will have better color coherence. Another example is the generation of 3D object models from still images. In this case, the texture of the object is extracted from the still images and colour differences between the still images have to be modelled and compensated. The challenge is similar for image stitching. Note that, for the 3D object model creation or for image stitching, the colour inconsistency mainly comes not from the camera calibration but from the configurations such as automatic white balancing, automatic exposure settings, 3D lighting effect etc.

Known methods for the compensation of color differences in input images can be divided into two groups: color mapping and color transfer. Usually, two images are processed and the goal is to describe the color transform that allows transforming the colors of the first image into the colors of the second image.

In color mapping, it is assumed that geometrical correspondences between the input images are available. Geometrical correspondences can be automatically extracted from images using known methods. For example, a well known method for detection of so-called feature correspondences has been disclosed by Lowe D. G. Lowe, Distinctive image features from scale invariant key points, Int. Journal of Computer Vision 60(2), 91-110 (2004). This method, called SIFTS as abbreviation for Scale Invariant Feature Transform, detects corresponding feature points using a descriptor based on Difference of Gaussian. From these correspondences, corresponding colour are extracted from the input images. For example, it is known to estimate a Gamma-Offset-Gain model from the corresponding colours.

In colour transfer, geometrical correspondences are not used. There is a case where precise geometrical correspondences are not meaningful because the two input images do not show the same semantic scene but are just semantically close. For example, the colours of an image of a first mountain scene shall be transformed into the colours of the image of a second mountain scene. In another case, the two input images show the same semantic scene, but anyway, geometrical correspondences are not available. There are several reasons for that. First, for reasons of workflow order or computational time, geometrical correspondences are not available at the time of processing of color transfer. A second reason is that the number of reliable geometrical correspondences is not sufficient for color transfer, for example in low textured images.

One well known color transfer algorithm has been disclosed by E. Reinhard, M. Ashikhmin, B. Gooch, P. Shirley, Color Transfer between Images, IEEE Computer Graphics and Applications, special issue on Applied Perception, Vol. 21, No. 5, pp 34-41, September-October 2001. They propose to transfer the first and second order image signal statics from the reference image to the corresponding target image. In order to be able to process the color channels separately, they use an empirical de-correlated color space.

When applying a known color mapping algorithm, the colors of corresponding features are exploited. If the image contains artifacts, the corresponding features may be erroneous. Image artifacts include noise, compression artifacts and local color changes. Other effects such as parallax, uncovered and covered image regions lower the precision of feature correspondences or cause even outliers in the image correspondences. All such errors in feature correspondences will impact the precision of the estimated color mapping model.

Outlying feature correspondences can be detected using geometrical constraints. For example, known methods assume a plane 3D scene and estimate a geometric, projective transform describing the geometrical differences between two images. Those feature correspondences that are outliers with respect to this estimation will not be used for estimation of the colour mapping model. This approach does not work when the dynamics of the depth of the scene is high.

When applying a color transfer method to images that show the same semantic scene, all parts of the image will be exploited. However, the precision of the calculated color transform will suffer from the presence of image regions that have no correspondence in the other image, respectively.

This can happen for the following cases:

-   -   Presence of cropping from one to the other image;     -   Regions that are covered or uncovered by parallax effect;     -   Regions that are covered or uncovered by moving objects.

Those regions will be included in the algorithm. For example, the image statistics calculated by Reinhard will be influenced by such regions.

The invention aims to enhance robustness. For a given n-tuple of input images, and an initial set of n-tuples of corresponding feature points between the images of the n-tuple of input images, each feature point of an n-tuple of corresponding feature points being an image position in the related image of the n-tuple of images, respectively, the invented method applies the following steps:

-   -   1. Estimate an initial color mapping model capable to compensate         the image colors of the given, corresponding feature points of         said set of n-tuples of corresponding feature points, the         initial color mapping model being a color transform;     -   2. Defining a spatial neighborhood for each feature point in the         corresponding image of said n-tuple of input images;     -   3. For all n-tuples of said set of n-tuples of corresponding         feature points, compensate the color differences of the feature         points and their spatial neighborhoods using said current color         mapping model;     -   4. Rejecting as outlier those n-tuples of corresponding feature         points that have remaining color differences higher than a         threshold resulting in a reduced set of n-tuples of feature         correspondences.     -   5. Estimate a refined color mapping model capable to compensate         the image colors of the reduced set of feature points colors of         said set of n-tuples of additional colors, the refined color         mapping model being a color transform.     -   6. Setting the current color mapping color transform to said         refined color mapping color transform and go on with step 2.

The block diagram in FIG. 9 illustrates said steps of the proposed system. Possible Variations are e.g.

-   -   Making the threshold for remaining color differences local, for         example setting it to the color difference before color mapping     -   Using color ratios instead of color differences

In the following, a sample implementation of the invented method for stereo images is presented. In this case, the n-tuple of input images is a pair of input images. The implementation employs the following steps:

-   -   Estimation of corresponding feature points         -   In case of stereo images, the initial set of n-tuples of             corresponding feature points is an initial set of pairs of             corresponding feature points, each feature point of a pair             of corresponding feature points being an image position in             the related image of the pair of stereo images,             respectively. The corresponding feature points are             calculated using the SIFT algorithm.     -   Estimation an initial color mapping model         -   The well-known color mapping method based on gain, offset             and gamma—GOG—is chosen and estimated from the colors of the             corresponding feature points. The color transform is known             as gain, offset and gamma—GOG—model.     -   Definition of a spatial neighborhood for each feature point will         be explained below in more detail.     -   Compensation of color difference         -   For all pairs of said set of pairs of corresponding feature             points, compensate the color differences of the feature             points and their spatial neighborhoods using said current             color mapping model;     -   Rejection of outliers         -   Those n-tuples of corresponding feature points that have             remaining color differences higher than a threshold             resulting in a reduced set of n-tuples of feature             correspondences.     -   Quality evaluation and iteration         -   Setting the current color mapping color transform to said             refined color mapping color transform and go on with step 2.

Possible Variations are e.g.:

Having several first images and several second images;

Applying the same principle region by region to the images.

An important implementation detail is the limitation of image signal values. When applying the estimated color transform to an image, values smaller than the minimum value as usually zero and larger than the maximum value as e.g. 255 in an image with 8 bit encoding of color coordinates can occur. Reason is that either the model is not precise enough or that a single global model does not describe local color changes in the image. One possible solution is clipping of transformed colors to the allowed signal range as shown in FIG. 2. Another method is to use the constrained of limited range during estimation of the color transform. The constrained should be that transformed colors lie within the allowed range. This can be included in estimation using estimation constrains.

The recommended method has the following advantages:

-   -   To be able to ensure color mapping even in presence of outliers         and high depth dynamics.

To allow high precision color mapping even in presence of strong image noise and compression artifacts.

FIG. 1 shows a flowchart of outlier detection according to the invention. The idea is to exploit the spatial neighborhood of the geometric feature correspondences GFC in the left and right stereo images to remove outliers from the GFC.

The recommended method differs from classical robust estimation and outlier detection in so far that the decision to use or not to use a feature point is not only based on the feature point itself but on the spatial neighborhood of the corresponding feature point in the original and the target image.

It has been found that to identify that kind of outliers where looking into their colour correspondences looks very convincing whereas looking into colour neighborhood reveals that the correspondence is a wrong one. However, another unwanted and exceptional situation is that the neighborhood is similar but colour correspondences are not similar and in that case the proposed method will miss the detection of outlier.

It has been found that the recommended outlier detection and removal method will improve classical outlier detection in two aspects. A first aspect is to reduce the number of false positives in outlier detection. This means we reduce the number of cases where a CC is detected as an outlier but truly is not an outlier. As a result of reducing the false positives, the colour mapping estimation model will receive more valid information and thus better estimation. Secondly, we also reduce the number of false negatives. This means we want to reduce the number of cases where a CC is detected as valid but truly it is an outlier. Reducing false negatives is more important as the model can be influenced by those missed outliers.

Let us analyze a particular example shown in FIG. 4. A dark black colour A of a feature point in the left image corresponds to a dark grey colour B of the corresponding feature point in the right image. Let's assume that initial colour model estimation is complete resulting in an initial colour mapping model ICMM, where an outlier removal in difference to the method illustrated in FIG. 7 is performed after an initial model creating. Note that, this estimation considers all colour correspondences and the result of estimation is shown in FIG. 5. Let us further assume that, these corresponding colours A and B are surrounded by lighter colours. In the case where the initial model ICMM cannot map the colour A into colour B, i.e. ICMM(A) is far away from B, this feature point will be declared as outlier by the classical robust estimation methods. Assuming that this decision is a false positive, i.e. it's the fault of the model ICMM that ICMM(A) does not give B. In other words, at least in dark colours such as A, the initial model ICMM is erroneous. The classical method will consider this feature as outlier while it should not. As shown in FIG. 5, as AB or CD is far from initial estimation, classical method will consider those as outliers OL whereas in reality they are not outliers NOL.

The issue of classical robust estimation is that it solely depends on the initial model ICMM and the corresponding colors A and B.

To solve this issue, we propose to look into the feature points neighbour-hoods in the left and the right images to decide about the outlier removal. It is quite probable that the neighborhood contains other colours than A in the left image and B in the right image. Let us assume that the neighborhood of colour A contains some lighter colours. Let's further assume that the initial model is better for lighter colours than for darker colours. In this case, the model ICMM would work better in the neighborhoods of the colours A and B than for the colours A and B themselves. Therefore the false positive decision is corrected and the feature point is not any longer detected as outlier OL.

As it is an aspect of the present invention to provide improved outlier detection, for the sake of illustration and experiment any colour mapping model may be used. Only as an example for an embodiment in the following the Gamma, Offset Gain—GOG—model is used.

According to the flowchart of the recommended outlier detection illustrated in FIG. 1 let's consider the left image of the stereo pair of images is the reference image RI whereas the right image of the stereo pair is the test image TI. FIG. 1 shows the flowchart of the proposed outlier detection method where Geometric Feature Correspondences GFC and Colour Correspondences CC are computed in a known manner first. Then, gamma, offset, gain estimation GOG is performed and e.g. used to achieve the initial colour corrected test image ICTI. It is important to note that this primary colour correction uses all CC including outliers. Now, we will compare the Geometric Feature Correspondences GFC neighborhood of the initial colour corrected test image ICTI of the test image TI with the reference image RI, which according to the embodiment illustrated in FIG. 1 is the right image of the pair of images. As the test image TI is already primarily colour compensated, the colour distribution between neighborhoods—as predetermined pixel blocks—should be close i.e. the remaining colour difference in the neighborhood should be within a certain threshold. If the neighborhood difference is below that threshold then the Colour Correspondence CC is not an outlier NOL and vice-versa. The threshold is chosen as 2*σ where σ2 is the variance of estimation error. The estimation error C_(error) is described by the following equation 1 where C_(ref) is the reference RGB colour and Ĉ_(estimated) is the estimated RGB colour provided by the gamma, offset, gain estimation GOG.

C _(error) =C _(ref) −Ĉ _(estimated)  —Equation 1—

During neighborhood comparison, we should be concerned with some issues such as the comparison metric should be rotation invariant or invariant against other geometric transformations such as tilting. This means that if by chance the test image TI is rotated—or transformed—with respect to the ref-erence image RI then the recommended outlier detection method should not fail.

Large neighborhood seems to be good for a detection of more and more true positive outliers. However, computational costs get higher if bigger neighborhoods have to be compared. That's why for the purpose of the analysis of the effects of the proposed method for each Geometric Feature Correspondences GFC, we will start with small neighborhood such as 3×3 pixel blocks, then a 5×5 pixel blocks and so on. We will stop until the Geo-metric Feature Correspondences GFC is declared as outlier or a maximum neighborhood size and pixel block size respectively is reached.

Let's analyze a simple scenario as shown in FIG. 3, where pixel blocks P, Q represent a good Geometric Feature Correspondences GFC. It means that the image content which is geometrically pointed by pixel block P in the left view—Left Image—is the same as it is pointed in the right view by pixel block Q of the gamma, offset, gain—GOG—corrected image. In contrast let's assume pixel blocks R, S have a bad Geometric Feature Correspondences GFC. It simply means correspondence between the pixel blocks R and S is wrong, i.e. that pixel blocks R, S represent an outlier OL. The dotted boxes around the Geometric Feature Correspondences GFC are the so called neighborhoods as e.g. a 7×7 pixel block. Note that the neighborhood can be defined by a cycle or an ellipse or any other shape. Now, we will declare a Geometric Feature Correspondences GFC as valid when for each channel as e.g. the R, G, B for red, green and blue independently the absolute mean neighborhood difference between reference image RI and initially corrected test image ICTI is within the threshold. On the other hand, if the difference is larger than the threshold then it is an outlier OL.

A comparison of the classical outlier removal method with the proposed method is shown in the following table where true positive means detected outliers are really outliers OL and false positive means detected outliers are not really outliers OL.

Stereo Pair neighbourhood Classical method Proposed method Building 5 × 5 True positive: 6 True positive: 7 False positive: 0 False positive: 0 Missed: 5 Missed: 4 Building 15 × 15 True positive: 6 True positive: 7 False positive: 0 False positive: 0 Missed: 5 Missed: 4 Building 25 × 25 True positive: 6 True positive: 8 False positive: 0 False positive: 0 Missed: 5 Missed: 3

The table shows an outlier removal method comparison with different sized neighborhood and pixel bock size respectively.

The results are based on a real example as shown in FIG. 11 where a reference image RI, a test image TI and an initially corrected test image TI of a scene called Building in colour are presented as black/white pictures as col-our pictures for formal reason are not allowed up to now. We have used a stereo database known as BOLD or Correlation-based intrinsic image extraction from a single image for our experiment. As the images in this database are very high-resolution image, for fast processing, images are resized to 10% of their original size but with no compression.

FIG. 12, FIG. 13 and FIG. 14 show the Red, Green and Blue channel estimation by nonlinear regression using Levenberg-Marquardt algorithm. After the regression the gamma, offset, gain GOG parameters for all three channels are available. Now if we apply this estimated model on the test image TI then we get the initially colour corrected test image ICTI as shown in FIG. 11. Now, we can start the proposed outlier removal technique. FIG. 15 illustrates a 3×3 pixel block neighborhood comparison where—for example—the threshold for colour coordinate differences is chosen to be 8, wherein colour coordinate difference means a difference between values representing a certain colour value of the same colour at a corresponding location.

For each channel, when the absolute difference of colour coordinate values keeps below the threshold, it is counted as a match and whenever it is not the case it is counted as non-match. Notice that, in red channel there are more non-match than match, whereas in the green and blue channel there are more matches available. This shows that the red colour correspondences are noisier than those of the green and blue channel. Let's analyze what is the global scenario. If we compare FIG. 12 to FIG. 14 then it can be seen that red channel suffers from noise, more than the green and blue. And the impact can be seen during outlier detection. Here is the strength and novelty of the proposed method. Because, one of the channels estimation may be noisier but if the others are less noisy then during the outlier detection it will not make false positive as one channel may got less match but the other channel will compensate it. This means that one single decision—outlier or not outlier—is taken for all three colour channels of a block. At the end of outlier removal, it can be seen that the proposed method has detected 7 outliers OL and all of them are true positive.

There are several possibilities to perform said neighborhood comparison with more or less success as will be shown in the following.

Let us remind that the neighborhood comparison of a feature correspondence is carried out between the reference image and the initial corrected test image. Note that, comparison process is done channel wise and for the sake of discussion it is assumed that the neighborhood size is a 3×3 pixel block. We will show several possible ways to compare the neighborhood and their advantage and disadvantages.

In the first comparison method, for each channel, we may compute the absolute difference between the mean colour coordinates of corresponding neighborhoods as shown by equation 2 below. Here, diff_(p×p) refers to the difference of p×p window around the GFC. C_(ref) and C_(ict) refer to the reference image RI colours and the initial corrected test image ICTI respectively.

$\begin{matrix} {{diff}_{p \times p} = {{abs}\left( {{\frac{1}{p^{2}}{\sum\limits_{i = 0}^{p^{2} - 1}C_{ref}}} - {\frac{1}{p^{2}}{\sum\limits_{i = 0}^{p^{2} - 1}C_{ict}}}} \right)}} & {{Equation}\mspace{14mu} 2} \end{matrix}$

After the computation of absolute differences for all three colour channels, if the majority of differences are less than a threshold being a predetermined colour coordinate difference, then the Geometric Feature Correspondences GFC is not an outlier OL and vice-versa as shown in equation 3 for one single colour channel.

$\begin{matrix} {{{Is}\mspace{14mu} {outlier}} = \left\{ \begin{matrix} {{no},} & {{diff}_{p \times p} \leq {threshold}} \\ {{yes},} & {{diff}_{p \times p} > {threshold}} \end{matrix} \right.} & {{Equation}\mspace{14mu} 3} \end{matrix}$

The main disadvantage of this type of comparison of overall mean values is that it literally assumes the colour mapping as linear. But the neighborhood may contain any colour and thus taking the average will not only miss lot of outliers OL but also will notably increase false positives.

The second comparison method is to cluster the colours at first and then to compare corresponding clusters as shown in a flow diagram in FIG. 2. FIG. 2 illustrates that the colours in the neighborhood of a feature point in the reference image are clustered and sorted and compared to the colours in the neighborhood of the corresponding feature point in the test image that are clustered and sorted, too. If the absolute difference of colours is larger than a predetermined threshold, the colour is declared to be an outlier OL. A k-means clustering method could be used where the mean of the cluster could be compared according to threshold criteria. K-means clustering is a well known method and can be understood as a method of cluster analysis which aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean value. When comparing colours, the colours are ordered in colour space in order to compare potentially corresponding colours. This second comparison method is more robust than the first comparison method as here the non-linear mapping is divided into several linear mappings but still it cannot prevent a lot of false positives.

The described comparison methods use two parameters that need to be chosen thoroughly. The first parameter is the window size of the neighbor-hood window. If the window size is too small, relevant information for outlier detection is missing and the performance of the method will be limited. If the window size is too large, geometric distortions between the images lead to non-corresponding colors with negative impact of the performance. A practical compromise is to link the window size to the width of the image by choosing a window size being one percent of image width. For example, for HDTV images having a width of 1080 pixels, a window size of an 11×11 pixel block is appropriate. A second parameter is the number of clusters to be chosen. If the number of clusters is too small, the information of the neighborhood window is badly represented and the method of outlier detection will suffer from loss of performance. Small numbers of clusters are even more inappropriate the less linear is the color mapping model and the smaller are details in the image. If the number of clusters is too high, the method of outlier detection will suffer from present image noise and geometric distortions between the images. For the indicated window size, we used e.g. a number of four clusters. With fours clusters, binary patterns as edges and lines as well as non-binary pattern as grey ramps and color ramps can be represented sufficient precisely. Other parameter values as e.g. dependent on the size of image de-tails, image noise, geometric distortions and the type of color mapping model may be used under specific conditions.

A third possibility for comparing neighborhoods is a modification of the second comparison method in such a way that a maximum number of colour clusters is used. In other words, this simply means sorting the corresponding colours and then comparing the individual colours in the sorted list according to the threshold criterion. Following equations 4 and 5 describe the method, where C′_(ref)(i) and C′_(ict)(i) refer to the i^(th) sorted colour of reference image RI and initial corrected test image ICTI respectively. The main strength of this method is not only the fact that it is rotation invariant but it is also robust against false positives.

$\begin{matrix} \left\{ \begin{matrix} {{match},} & {{{abs}\left( {{C_{ref}^{\prime}(i)} - {C_{ict}^{\prime}(i)}} \right)} \leq {threshold}} \\ {{nonmatch},} & {{{abs}\left( {{C_{ref}^{\prime}(i)} - {C_{ict}^{\prime}(i)}} \right)} > {threshold}} \end{matrix} \right. & {{Equation}\mspace{14mu} 4} \\ \left\{ \begin{matrix} {{outlier},} & {{{Total}\mspace{14mu} {match}} < {{Total}\mspace{14mu} {nonmatch}}} \\ {{{not}\mspace{14mu} {outlier}},} & {Otherwise} \end{matrix} \right. & {{Equation}\mspace{14mu} 5} \end{matrix}$

A fourth comparison method for neighborhood comparison is a direct pixel to pixel comparison according to threshold criteria, wherein the top-left pixel of pixel block P is compared with the top-left pixel of pixel block Q and so on. For each colour channel, said comparison decides whether it is a match or non-match. After performing the same operations for all three channels and if the total number of matches is more than a total number of non-matches, it is determined that it is not an outlier OL and vice-versa. The basic of this approach is very similar to equation 4 and equation 5 except the fact that here colours are not sorted rather they are compared according to their spatial position. The main disadvantage with this approach is that it is not invariant against rotation.

Therefore with respect to the illustration in FIG. 3, the following variation of the fourth method is recommended. If in a colour channel the absolute difference between the colour coordinates of two corresponding pixels is below a predetermined threshold then increment a counter of match. Similarly, if the absolute difference between colour coordinates is equal to or more than said threshold then increment a counter of non-match. Said steps are repeated for all colour channels as e.g. R, G, B. After that, the total number of match and non-match is counted for pixel block P and pixel block Q. If a total number of match is more than a total number of non-match then the pixel blocks P and Q are declared as valid and a not outliner NOL is determined. Otherwise, it is declared as an outlier OL. The method is e.g. realised according to a flow-chart shown in FIG. 2.

In the following, a critical judgment of the proposed method mainly concerning two aspects is discussed. The first one is related to what are the situations when the proposed method will miss a certain outlier and why. The second aspect is related to the feature whether an increase of the size of the neighborhood will result in more true positives.

If we compare all feature correspondences with ground truth, then we can see that for a certain neighborhood size, some of the outliers are missed by the proposed method. Some of the examples and justification of why those are missed are given below:

-   -   Homogeneous region: If the neighborhood contains only regions         with homogeneous colour then it is more probable that it will         miss some outliers. For example, on top of the building we can         see a part of the sky. The proposed method has missed one         outlier from the sky because the neighborhood of the         correspondences are very similar in fact it is the same blue sky         as shown in FIG. 16

FIG. 16 illustrates missed outlier, which are e.g. red pixels, here for visibility purposes illustrated by X. Such missed outlier is caused due to homogenous neighborhood.

-   -   Homogeneous dark region: The sun may create a shade on the wall         which is dark and the proposed method missed one point there         because the background brick colour neighborhood as 7×7 or 15×15         pixel blocks is similar. But, a pixel block size of a 25×25         pixel block has correctly detected this as outlier as         illustrated in FIG. 17.

FIG. 17 illustrates in a left image for illustration purposes a surrounded pixel in a dark area of the reference image R illustrated in FIG. 11 and in the right image a corresponding surrounded pixel in the initially colour corrected test image ICTI determined by SIFT and located in a different area of the image is missed with a 7×7 as well as a 15×15 pixel block neighborhood processing, however, has been detected with 25×25 pixel block neighborhood processing as an outlier OL. The proposed method missed some outliers which are on the homogeneous or similar neighborhood; however, these are not the worst type for the colour estimation model and nevertheless may be detected by using an extended pixel block size neighborhood processing.

-   -   Repetitive pattern: Neighborhood pattern on roof corner having         bricks and part of the roof has matched by chance with another         part of the wall as shown in FIG. 18.

FIG. 18 illustrates images of the roof corner in top floor matched with a window corner, wherein both have similar neighborhood and in fact are similar pattern Z, so that the proposed method missed this outlier OL.

As the proposed method determines outliers OL by comparing the neighborhood, the size of the neighborhood has an important impact on the performance of outlier detection as shown above. It has been observed that as the neighborhood size is increasing the outlier detection performance is also increasing until a certain threshold as from a certain pixel block size also the chance in the occurrence of a match increase, which by chance is related to a different location.

Consequently, efficient outlier detection especially in view of the necessary computing power is performed until a certain pixel block size.

Nevertheless, as the comparison of outlier detection methods has shown above, the recommended method improves the outlier detection.

The recommended method has two main advantages over the existing methods.

The first advantage comes from the fact that it is more robust and easy to analyze a partially colour-corrected image initially corrected test-view than a non colour-corrected image. And the second advantage is the exploitation of spatial neighborhood of the initially corrected test-view.

In a stereo workflow, colour difference compensation is often the first step so that other steps such as disparity estimation or compression can be benefited as shown in FIG. 8.

One approach for the compensation of colour differences between images is colour mapping. In a stereo application, colour mapping assumes that left and right images contain almost the same scene. In other words, there is a strong semantic relationship between the images. FIG. 7 shows the basic steps of colour mapping. It typically starts by finding the Geometric Feature Correspondences GFC using methods such as Scale Invariant Feature Transform SIFT or simply normalized cross correlation CC. GFC is a list of pairs of corresponding feature points in the left and the right image. As GFC computation is not free from errors, some of the corresponding feature points are wrong and are called outliers. So, in the next step, those outliers are usually re-moved from GFC. Then, colour coordinates such as typically R, G, and B for red, green and blue are retrieved from the two images using the feature correspondences. We call these retrieved colours Colour Correspondences CC. Finally, the CC is used to fit a colour model. This model describes the relationship between the correct view and the view to be corrected. If this model is applied to the view to be corrected then it will compensate the colour differences.

In the literature, different colour mapping models are proposed. A classical parametric model the gamma offset gain—GOG—model which is based on the camera characteristics. Tehrani et al. as well as Yamamoto and Oi have used a global, data-driven, look up table based model. Wang et al. proposed a local, region-based colour mapping model with just a simple, constant colour offset per region.

However, the outlier removal step is significant for all colour mapping models because for example, if a GFC lies in a highly textured region, a small error in spatial position of GFC can generate a large error in CC. So, a robust outlier removal method is necessary.

In this context of colour correction for stereo, the proposed method recommends to remove outliers from the GFC exploiting the colour information of the spatial neighborhood in the stereo images. Unlike the existing methods, the recommended method will not remove the outliers immediately after computing GFC, rather it will try to colour-correct the image with computed GFC first and then it will analyze the spatial neighborhood to decide which GFC are outliers. In other words, the method differs in so far that the decision to use or not to use an observation is not only based on the feature point itself but on its spatial neighborhood.

A classical way of dealing with outliers is to use all available CC for estimation of an initial colour mapping model. Then, around the estimated initial col-our mapping model curve, a confidence corridor is chosen based on assumption that the initial estimation result is close to the ground truth. All CC outside the corridor are considered to be outliers and thus removed from estimation. The remaining CCs are so called valid CC and estimation is done once again. This estimated model is expected to be free from the influence of outliers. The limitation of this method is that if the initial estimation is far from ground truth then this outlier detection technique will miss a wide range of true outliers as well as it will mistakenly detect some truly valid CC as outliers OL. Another limitation is that outlier removal is often done channel-wise which may raise inconsistency between channels. For example, when red channel of a pixel consider a CC as valid but the blue channel of the pixel may not agree. In that case, if we declare the blue channel information as outlier and at the same time red channel information as valid then it's a consistent for the colour estimation model. On the other hand if we remove the whole pixel information from all three channels then we are losing information from estimation.

In summary, this outlier detection method is a straight-forward application of robust estimation. Robust estimation associates less weight or even no weight to observations that contribute large cost to the cost function. Here binary weight is used, i.e. either uses observations for estimation or declares them as outliers. A classical outlier removal is illustrated in FIG. 6, wherein the middle curve represents the initial estimation using all CC. Then a region shown by dotted corves is chosen to remove outliers by declaring CC inside said dotted corves as valid CC and CC outside as outliers. However, as shown in FIG. 4 and described above, classical outlier removal fails e.g. if corresponding colours A and B are surrounded by lighter colours. Said disadvantage of classical outlier removal is avoided by the proposed method looking into the feature point's neighborhoods in the left and the right images to decide about the outlier removal.

An arrangement to perform the recommended method illustrates a block diagram shown in FIG. 10, wherein a neighborhood comparator NHC is arranged between means providing an initially corrected test image and a means for providing a corrected colour correspondence of the stereo pair of input images as e.g. a colour correspondence signal processor. The improved outlier detection is performed by said neighborhood comparator NHC which provides not outlier NOL for further processing as e.g. the colour correspondence signal processor. An embodiment of the neighborhood comparator NHC is illustrated in FIG. 2 illustrating method and arrangement of a neighborhood comparator NHC. That means that method and arrangement are based on the same structure wherein the difference between corresponding sorted colours and/or clusters is compared with a predetermined threshold to provide improved outlier detection for reliable colour mapping.

Although the invention has been shown and described with respect to specific embodiments thereof, it should be understood by those skilled in the art that the foregoing and various other changes, omissions and additions in the form and detail thereof may be made therein without departing from the spirit and scope of the claims. 

1. A method for outlier (OL) detection and not outlier (NOL) detection for colour mapping, wherein a neighborhood of a partially colour compensated test-image (ICTI) by comparing the initially corrected test-image (ICTI) with a reference image (RI) in a neighborhood comparator (NHC) is used for outlier (OL) detection and not outlier (NOL) detection of at least two images for colour mapping.
 2. Method according to claim 1, wherein for outlier detection the decision to use or not to use a feature point is not only based on the feature point itself but on the spatial neighborhood of the corresponding feature point in the original and the target image.
 3. Method according to claim 1, wherein a spatial neighborhood of Geometric Feature Correspondences (GFC) of two images is used to remove outliers (OL) from the Geometric Feature Correspondence (GFC).
 4. Method according to claim 1, wherein the two images are left and right stereo images and one of the two images is used as reference image (RI) and the other one is used as test image (TI).
 5. Method according to claim 1, wherein for a given n-tuple of input images, and an initial set of n-tuples of corresponding feature points between the images of the n-tuple of input images, each feature point of an n-tuple of corresponding feature points being an image position in the related image of the n-tuple of images, respectively, to apply the following steps: estimating an initial colour mapping model capable to compensate the image colours of the given, corresponding feature points of said set of n-tuples of corresponding feature points, the initial colour mapping model being a colour transform, defining a spatial neighborhood for each feature point for each of said n-tuple of input images, for all n-tuples of said set of n-tuples of corresponding feature points to compensate the colour differences of the feature points and their spatial neighborhoods using said current colour mapping model, rejecting as outlier those n-tuples of corresponding feature points that have remaining colour differences higher than a threshold resulting in an reduced set of n-tuples of feature correspondences, estimating a refined colour mapping model capable to compensate the image colours of the reduced set of feature points colours of said set of n-tuples of additional colours, the refined colour mapping model being a colour transform and setting the current colour mapping colour transform to said refined colour mapping colour transform and go on with the second step as defining a spatial neighborhood for each feature point in the corresponding image of said n-tuple of input images and proceed as mentioned above.
 6. Method according to claim 5, wherein the threshold for remaining colour differences is a predetermined colour coordinate difference.
 7. Method according to claim 5, wherein colour ratios instead of colour differences are used.
 8. Method according to claim 1, wherein Geometric Feature Correspondences (GFC) and a Colour Correspondences (CC) are computed first, then a colour mapping model including parameters for gamma, offset and gain (GOG) is estimated and used to achieve the initial colour corrected test image (ICTI).
 9. Method according to claim 8, wherein the colour correction uses all Colour Correspondences (CC) including outliers (OL).
 10. Method according to claim 1, wherein a result of comparing the initially corrected test-image (ICTI) with a reference image (RI) in the neighborhood comparator (NHC) below a predetermined threshold is declared as not outlier (NOL).
 11. Method according to claim 10, wherein color ratios instead of color differences are used for comparing the initially corrected test-image (ICTI) with a reference image (RI) below or above a predetermined threshold.
 12. Method according to claim 10, wherein the threshold is determined as a variance of the estimation error determined as difference between a reference colour and an estimated colour provided by a gamma, offset, gain (GOG) estimation.
 13. Method according to claim 1, wherein for comparing the initially corrected test-image (ICTI) with a reference image (RI) in the neighborhood comparator (NHC) the absolute mean difference between corresponding neighborhoods is used.
 14. Method according to claim 1, wherein for comparing the initially corrected test-image (ICTI) with a reference image (RI) in the neighborhood comparator (NHC) a pixel block size of one percent of image width and a number of four clusters is used.
 15. Arrangement for outlier (OL) detection and not outlier (NOL) detection for colour mapping, wherein a neighborhood comparator (NHC) is arranged between a means for providing a corrected colour correspondence of a pair of input images being a reference image (RI) and a test image (TI) and means providing an initially corrected test image (ICTI) and the reference image (RI) for providing not outlier (NOL).
 16. Arrangement according to claim 15, wherein the neighborhood comparator (NHC) has means to compare corresponding sorted colours and/or clusters with a predetermined threshold. 